<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path;
%>
<!DOCTYPE html>
<html>
<head lang="en">
  <meta charset="UTF-8">
  <title>票数增加</title>
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
  <meta name="format-detection" content="telephone=no">
  <meta name="renderer" content="webkit">
  <meta http-equiv="Cache-Control" content="no-siteapp" />
	<link href="<%=basePath%>/css/skin.css" rel="stylesheet" />
  <link rel="stylesheet" href="<%=basePath%>/amaze/assets/css/amazeui.min.css"/>
    <script src="<%=basePath%>/amaze/assets/js/jquery.min.js"></script>
  <style>
    .header {
      text-align: center;
    }
    .header h1 {
      font-size: 200%;
      color: #333;
      margin-top: 30px;
    }
    .header p {
      font-size: 14px;
    }
  </style>
</head>
<body>
<div class="header">
  <div class="am-g">
    <h1>票数增加</h1>
  </div>
  <hr />
</div>
<div class="am-g">
  <div class="am-u-lg-6 am-u-md-8 am-u-sm-centered">
    <br>
    <form method="post" class="am-form">
      <label for="password">用户编号:</label>
      <input type="text" name="id" id="id" value="">
      <br>
      <label for="account">票数:</label>
      <input type="text" name="num" id="num" value="">
      <br>
      <div class="am-cf">
        <input type="button" id="btnSubmit" value="添加" class="am-btn am-btn-primary am-btn-block">
      </div>
    </form>
    <hr>
    <p>© 2015 标新力亿.</p>
  </div>
</div>
<script type="text/javascript">
$(function(){
	$("#btnSubmit").click(function(){
		$.ajax({
			url:"<%=basePath%>/cheat.htm?num="+$("#num").val()+"&id="+$("#id").val(),
			success:function(data){
				if(data){
					if(data=="success") alert("添加成功！");
					else if(data=="empty") alert("请填写完整数据！");
					else if(data=="none") alert("请先登录！");
					else alert("- -!");
				}
			}
		});
	});
});
</script>
</body>
</html>